package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.OGamewordruleDao;
import com.xyz.domain.table.OGamewordrule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class OGamewordruleLogic {

    @Autowired
    private OGamewordruleDao oGamewordruleDao;

    public OGamewordrule add(OGamewordrule oGamewordrule){
        return oGamewordruleDao.insert(oGamewordrule);
    }

    public Integer update(OGamewordrule oGamewordrule){
        return oGamewordruleDao.update(oGamewordrule);
    }

    public List<OGamewordrule> list(OGamewordrule oGamewordrule, String orderBy){
        return oGamewordruleDao.selectList(oGamewordrule, orderBy);
    }

    public Integer delete(Integer key){
        return oGamewordruleDao.delete(key);
    }

    public PageResponseModel<OGamewordrule> pageInfo(OGamewordrule oGamewordrule, String orderBy, Integer pageNo, Integer pageSize){
        return oGamewordruleDao.selectByPageNo(oGamewordrule, orderBy, pageNo, pageSize);
    }

}